include(cc_binary)
include(cc_library)
include(cc_test)

cc_library(
  NAME 
    batch
  HDRS
    dit_batch.h
    batch.h
    batch_factory.h
    batch_input_builder.h
    mposition.h
  SRCS 
    dit_batch.cpp
    batch.cpp
    batch_factory.cpp
    batch_input_builder.cpp
    mposition.cpp
    beam_search.h
  DEPS
    :request
    :runtime
    :common
    glog::glog
)

cc_test(
  NAME
    batch_test
  SRCS
    batch_test.cpp
  DEPS
    :batch
    absl::time
    GTest::gtest_main
    $<$<BOOL:${USE_NPU}>:torch_npu>
)
target_link_libraries(batch_test
                      PUBLIC
                      Python::Python
                      $<$<BOOL:${USE_NPU}>:ascendcl>
                      $<$<BOOL:${USE_NPU}>:hccl>
                      $<$<BOOL:${USE_NPU}>:c_sec>
                      $<$<BOOL:${USE_NPU}>:nnopbase>)

